<?php
namespace app\index\controller;
use think\Controller;
use think\Db;
use think\Session;
class User extends Controller
{

    public function  getuser(){
        $uid = Session::get('uid');
        $res =  Db::name('user')->where('id',$uid)->find();
        return msg(1,'用户信息',$res);
    }

    //我的提现账户
    public function getuserbank(){
        $uid = Session::get('uid');
        $res =  Db::name('user_bank')->where('uid',$uid)->select();
        return msg(1,'我的提现账户',$res);
    }

    //提现记录
    public function withdraw(){
        $uid = Session::get('uid');
        $res =  Db::name('withdraw')->where('user_id',$uid)->select();
        return msg(1,'我的提现账户',$res);
    }

    //提现账户详情
    public function getuserbankdetails(){
        $uid = Session::get('uid');
        $bankid = input('bankid');
        $where['uid'] = $uid;
        $where['id'] = $bankid;
        $res =  Db::name('user_bank')->where($where)->find();
        return msg(1,'用户信息',$res);
    }

    //修改提现账户
    public function edituserbankdetails(){
        $uid = Session::get('uid');
        $bankid =input('bankid');

        $where['uid'] = $uid;
        $where['id'] = $bankid;
        $res =  Db::name('user_bank')->where($where)->find();
        return msg(1,'用户信息',$res);
    }


    //删除提现账号








}